package com.xuecheng.content.convert;

import com.xuecheng.api.content.model.dto.CourseTeacherDTO;
import com.xuecheng.api.content.model.vo.CourseTeacherVo;
import com.xuecheng.content.entity.CourseTeacher;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CourseTeacherConvert {

    CourseTeacherConvert INSTANCE = Mappers.getMapper(CourseTeacherConvert.class);

    @Mapping(source = "id", target = "courseTeacherId")
    CourseTeacherDTO entity2dto(CourseTeacher teacher);

    List<CourseTeacherDTO> entity2dtos(List<CourseTeacher> courseBase);

    CourseTeacher dto2entity(CourseTeacherDTO dto);

    CourseTeacherDTO vo2dto(CourseTeacherVo vo);
}
